﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Definition
{
    class Program
    {
        static void Main(string[] args)
        {
            method w = new method();
            Console.WriteLine("请输入你要完成什么运算，1为加法，2为减法，3为乘法，4为除法");
            double a = Convert.ToDouble(Console.ReadLine());
            if (a == 1 || a == 2 || a == 3 || a == 4)
            {
                Console.WriteLine("请输入第一个数字");
                double num1 = Convert.ToDouble(Console.ReadLine());
                Console.WriteLine("请输入第二个数字");
                double num2 = Convert.ToDouble(Console.ReadLine());
                if (a == 1)
                {
                    w.Add(num1, num2);
                    Console.WriteLine("两数相加为：{0}", w);
                }
                else if (a == 2)
                {
                    w.Minus(num1, num2);
                    Console.WriteLine("第一个数减去第二个数为：{0}",w);

                }
                else if (a == 3)
                {
                    w.Multiply(num1, num2);
                    Console.WriteLine("两数相乘为：{0}", w);

                }
                else
                {
                     w.Divide(num1, num2);
                    Console.WriteLine("两数相除为：{0}", w);

                }
            }else
            {
                Console.WriteLine("你没输入加减乘除对应的数字");
            }
            
        }
    }
}
